package com.fjd.service.impl;

import com.fjd.context.BaseContext;
import com.fjd.mapper.SettlementRecordMapper;
import com.fjd.service.CheckoutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class CheckoutServiceImpl implements CheckoutService {

    @Autowired
    private SettlementRecordMapper settlementRecordMapper;

    @Override
    public BigDecimal anchorcheck() {
        String anchorId = BaseContext.getCurrentId();
        BigDecimal income = settlementRecordMapper.getSettleAmount(anchorId);
        return income;
    }
}
